The closing of AAPL is represented by a linear regression model which includes predictors such us sequential days of trading, year, month, day, the closing level of the S&P500 and the NASDAQ100, 5 year, 10 year, and 30 year Treasury prices, and the dollar index.
The relationship between the predictors and the AAPL shares is not always linear. The predictors are hence transformed to reflect this, and then lagged 21 periods (trading sessions) to forecast forward closings.
There are signs of colinearity (predictors highly correlated with each other) in the model. This needs further research, certainly constitutes an opportunity for improvement, and is beyond the scope of this work for the time being.